package com.zee.example;

import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.zee.recyclerview.HintText;
import com.zee.recyclerview.IRecyclerViewRefreshView;
import com.zee.utils.UIUtils;

public class DRRecyclerViewRefreshView implements IRecyclerViewRefreshView {
    private TextView titleTV;

    @Override
    public int getLayoutID() {
        return R.layout.layout_refresh;
    }

    @Override
    public int getViewHeight() {
        return UIUtils.dpToPx(30);
    }

    @Override
    public void initViews(LinearLayout view) {
        titleTV = view.findViewById(R.id.id_title);
    }

    @Override
    public void onHintPullDown(int oldState) {
        titleTV.setText("下拉立即刷新");
    }

    @Override
    public void onHintReleaseHand() {
        titleTV.setText("不累吗？还不松手");
    }

    @Override
    public void onRefreshStart() {
        titleTV.setText("开始刷新");
    }

    @Override
    public void onRefreshEnd() {
        titleTV.setText("加载结束");
    }

    @Override
    public void onHeight(int height) {

    }

    @Override
    public void destroy() {

    }

    @Override
    public void setHintText(HintText mHintText) {

    }
}
